package com.itheima.reggie.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.reggie.common.QueryPageDTO;
import com.itheima.reggie.common.Result;
import com.itheima.reggie.entity.Employee;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;

/**
 * @author Yan
 * @date 2022/2/21
 */

public interface EmployeeService{
    /**
     * 登录方法
     * @param employee 员工
     * @return
     */
    Result<Employee> login(Employee employee);

    /**
     * 添加员工的方法
     *
     * @param employee
     * @return
     */
    Result<String> saveEmployee(Employee employee);


    /**
     * 分页查询
     * @param queryPageDTO 分页数据类
     * @return
     */
    Result<Page<Employee>> page(QueryPageDTO queryPageDTO);


    /**
     * 根据id修改员工信息
     * @param employee
     * @return
     */
    Result<String> update(Employee employee);


    /**
     * 根据id查询用户
     * @param id
     * @return
     */
    Result<Employee> getEmployeeById(Long id);

    /**
     * 启用禁用
     * @param employee
     * @return
     */
    Result<String> updateEmployeeStatusById(Employee employee);
}
